unit DealPathStr;

interface
uses
  SysUtils,dialogs;

function DealPath(Path : string):string;

implementation

function DealPath(Path : string):string;
var
  I : Integer;
begin
  for I := 0 to Length(Path) do
  begin
    if (Path[I]='\') and (Path[I+1]='\') then
    begin
      Delete(Path,I,1);
      Path := DealPath(Path);
    end;
  end;
  Result := Path;
end;

end.
